/* 全局样式 */
:root {
    /* 浅色主题变量 */
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #2c3e50;
    --text-light: #666;
    --bg-color: #f5f6fa;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: #e1e1e1;
    --transition-speed: 0.3s ease;
    --hover-transform: translateY(-2px);
    --card-shadow: 0 4px 6px var(--shadow-color);
    --card-shadow-hover: 0 8px 15px var(--shadow-color);
    --gradient-primary: linear-gradient(135deg, #3498db, #2ecc71);
    --gradient-hover: linear-gradient(135deg, #2980b9, #27ae60);
}

[data-theme="dark"] {
    /* 深色主题变量 */
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #ecf0f1;
    --text-light: #bdc3c7;
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --border-color: #404040;
    --gradient-primary: linear-gradient(135deg, #3498db, #2ecc71);
    --gradient-hover: linear-gradient(135deg, #2980b9, #27ae60);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    background-image: 
        radial-gradient(circle at 100% 100%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 0% 0%, rgba(46, 204, 113, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(var(--card-bg), 0.8);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    transition: all var(--transition-speed);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1:hover {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-speed);
}

.nav-links a:hover::before {
    transform: scaleX(1);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
    transform: var(--hover-transform);
}

.nav-links i {
    margin-right: 0.5rem;
    transition: transform var(--transition-speed);
}

.nav-links a:hover i {
    transform: translateY(-2px) rotate(10deg);
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    opacity: 0.2;
}

.theme-toggle:hover::before {
    width: 100%;
    height: 100%;
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(15deg) scale(1.1);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:hover::before {
    width: 200%;
    height: 200%;
}

.btn:hover {
    background: var(--gradient-hover);
    transform: var(--hover-transform);
    box-shadow: var(--card-shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #27ae60, #219a52);
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    transition: all var(--transition-speed);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    transform: var(--hover-transform);
}

.form-control:focus + label {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 主要内容区域 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.news-list {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-list h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.news-items {
    margin-bottom: 2rem;
}

.news-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed);
    animation: fadeIn 0.5s ease-out;
}

.news-item:hover {
    background-color: var(--bg-color);
}

.news-item h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.news-item .meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-numbers button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.page-numbers button:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-numbers button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.prev-btn, .next-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-jump {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.page-jump input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.jump-btn {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.jump-btn:hover {
    background-color: var(--primary-dark);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-bg);
    color: var(--text-light);
    margin-top: 3rem;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .news-list {
        padding: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-hover);
}

/* 动画效果 */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.publish-container,
.login-container,
.manage-container {
    animation: scaleIn 0.5s ease-out;
}

.nav-links a {
    animation: slideIn 0.5s ease-out;
}

/* 卡片悬浮效果 */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-speed);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: var(--hover-transform);
    box-shadow: var(--card-shadow-hover);
}

/* 工具提示 */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
    box-shadow: var(--card-shadow);
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* 时钟组件样式 */
.clock-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all var(--transition-speed);
}

.clock-container:hover {
    background-color: rgba(52, 152, 219, 0.1);
    transform: var(--hover-transform);
}

.clock-container i {
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.clock-time {
    font-weight: 500;
}

.clock-date {
    color: var(--text-light);
    font-size: 0.8rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .clock-container {
        margin-top: 1rem;
        justify-content: center;
    }
}

/* 联系页面样式 */
.contact-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

.contact-container h1 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.contact-container h1 i {
    margin-right: 1rem;
    color: var(--primary-color);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: var(--card-shadow);
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-card h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-card p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.contact-form label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-color-light);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-form .submit-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
}

.contact-form .submit-btn:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }

    .contact-container {
        padding: 1rem;
    }

    .contact-form {
        padding: 1rem;
    }
} 